package problem2;

public class Apple extends Fruit implements Comparable<Apple> {

	//apple's mass
	private int m=1;
	
	public Apple() {}
	
	public Apple(int m) {
		this.m = m;
	}
	
	public int getM() {
		return m;
	}

	public String toString() {
		return "Apple m="+m;
	}
	
	@Override
	public int compareTo(Apple o) {
		return m-o.m;
	}

}
